#https://pyjwt.readthedocs.io/en/stable/api.html

import base64
import jwt
import datetime
import os
import sys

SECRET_KEY=''

payload = {
    # годен до
    'exp': datetime.datetime.utcnow() + datetime.timedelta(days=0,hours=10, seconds=10),
    # время публикации
    'iat': datetime.datetime.utcnow(),
    # эмитент токена
    'iss': 'zzk',
    # user info
    'data': 'AAAA',
    "jti": "4f1g23a12aa"
     }

#запись чтение JWT
'''
sJwt=jwt.encode(
                payload,
                SECRET_KEY,
                algorithm="HS256",
            )

with open('jwt.cfg','w+') as f:
    f.write(sJwt)

try:
    with open('jwt.cfg','r') as f:
        sJwtr=f.read()
        print(
            jwt.decode(sJwtr,SECRET_KEY,algorithms=["HS256"],options=dict(verify_signature=True,verify_exp=True))
            )
except Exception as E:
    print(E)
'''

lFileList=list(filter(lambda s : s[-4::1]=='.xml',os.listdir(".")))

print(*enumerate(lFileList))

'''
for i in lFileList:
    os.rename(i, "qqq"+i)
'''
print(
    *map( lambda s: "xxx"+s , lFileList)
    )

print ("Привет, {}!".format (sys.argv[1] ) )
